package thired.algorithm;

public class FindTheMore {

    public  char findThe(String str1,String str2){
        int[] map = new int[26];
        char[] s1 = str1.toCharArray();
        char[] s2 = str2.toCharArray();
        for (int i = 0; i < s1.length; i++) {
            map[s1[i] - 'a']++;
        }
        for (int i = 0; i < s2.length; i++) {
            map[s2[i] - 'a']--;
        }
        char res = '0';
        for (int i = 0; i < 26; i++) {
            if(map[i]!=0){
                res = (char) (i + 'a');
                break;
            }
        }
        return res;

    }
//    public static void main(String[] args) {
//        System.out.println(findThe("xyzabc","abcxyzf"));
//    }
}
